package com.miaosha.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.miaosha.entity.Goods;
import com.miaosha.entity.dto.AuditReqDto;

import java.util.List;


public interface GoodsService extends IService<Goods> {

    /**
     * 根据id查找用户
     *
     * @param id
     * @return
     */
    Goods findById(Integer id);
    /**
     * 修改商品
     *
     * @param goods
     * @return
     */
    int update(Goods goods);

    List<Goods> listByName(String name, Long userId);

    void removeGood(Long id) throws Exception;

    void audit(AuditReqDto auditReqDto);
}
